adding selecting object by point refactoring