learning more about javascript functions and how to separate parts of code.