codes assignment 1