bugfix, added comments, removed logs