added comments and main function