writing test code for where with accurcay