style changes and added comments