added a couple helper functions
added a toString method