final commenting, cleaning up code