added comments and refined code syntax