putting the code in the right place