first crack at insertion code