fixed syntax error
renamed functions