tidy up API a little