final changes to code