for select method, changed .data to inherits(.data,"Database") as opposed to direct check of class