removed views function from custom function