add insert, performance is slow due to the locks and function call