update to separated db / error gen