Added hand rolled select and where