improved toString method