added select module and unit tests for it