code style, added comments