added comments, code gets better and better