restruct rbf to class