adjust to the nacl api which requires space in/out