added comments and a few space for better readability