check whether within() is being called