adding code for first assignment