Modified toString method