fixed notices and removed dbFetch