fixed error and changed part of db