gui code added