implement UI functionality