fixed commenting, refactored