the public api for code