fixed layout and added comments