next thing to implement: insert functions