added direction and radius + some refactoring