commenting and tidy up