some more changes to the code