Make this more generic.