using one massive script instead of breaking it up, will need to update documentation at the top as this is no longer a gist