Finished assignment3. Still needs comments