Would probably make sense to revisit this later and see if we can clean up the API