added comments and made code readable