made insert functions return reference to simplify coding