added toString method and added a test