adding gui code