added finalize to daos, still need to check if that solves the database
issue