Removing copy&paste code, part 2