added db ... need to finish testing ... almost there