updated comments and layout
fixed merging problem