some refactoring, using external properties