added semicolons and fixed indentation of new code