fixed a bug and gave database default values of 0