updating gui code