prepare port to JS
goto not implemented...