house keeping
added code comments and house keeping