make code easier to read
now remembers the last data type the user selected