some more changes to code