set backbutton handler if required function exists