Yes, the code above works just fine.