added control functionality