changes to work out the code