can't load views with a function