fixed a syntax error and added more documentation