pending db working. not tested