Implemented assignment 1