added toString method
fixed exception, syntax error