cleaning up and adding comments