starting new js api for internal use