corrected syntax errors, verified functionality