code it the right way