update readme
tidy up existing code