use uint instead of int
cleaned up code and created Duration program