This should be something a bit more generic.