implementing first assignment