implemented Week-2-assignment-1