making parameter for select operation more generalizable