gui code update