getWithin moved to helper