clean up code for option 1+2