Nice work making multiple functions.  It made your code more readable and if this was a program you'd be using more often it'd make it more maintainable.