code comments added for beautification