refactored DB class outputs to hashes from arrays, completed rest of methods using hash outputs