screen transition generation to functions