updated comments, made varibable names more clear