control functionality