implementation of select
Working SBO