some refactoring, views