edited custom print method