pass view as argument