added tests, fix for 'where''