fixed register passing between funcs