replaced Goto( function