tidying, lots of comments