refactor boundary detection classes