added some initiliasation stuff like reading from a file _or_ from user input and doing basic checks on the input