need to finish db implementation