modified for generic cms