restructure rbf kernel