last part of assignment 2