before select implementation