bunch of comments and restructuring