Changed the GUI so that you choose the type