creating db class