changes in accordance to assignment2 instructions