refactored to views