gui function added