Print function working