last cleanup, last format, comments inserted. hope that everything is working