Added more functionality for gui