Refactoring db to receive first insertions