some updates to tidy up the code