rewrite of cite menu function