refactored stuff out into separate views