added conditionalized preview support