cleaning up code2