still has database bug