split view functions into view module