1. Braces to be consistent with the rest of the javascript code.
2. Referencing copied code.
3. using jquery similar to the rest of the function