merge with tidy up