removed useless selection code