added function for test view