Added some functions to gui