Fixed syntax errors and added toString