modified func print