adding my first 'real' script using functions. don't like how it handles rounding'