implemented roleFunction view