added functions to views