just need to tidy up some format and commenting