added where and select