add api to access id; some cleanup