First implementation to insert functions