start breaking things into functions
Merge pull request #2 from WestleyArgentum/master

start breaking things into functions