tests for insert and remove functions