change dbops

from function method to class