new version with checks for erb and style