fixed closing bracket
fixed ruby syntax errors