writing make_assignment method