added comments and reformated text