cleaned up my code