cleanup generalizing stuff