changed to pattern return in getting electives