rearranged GUI and test pyplot