Half done assignment 3