update refresh custom menu function to set it more flixable such as transfer value to the js