another attempt at making the gui work