added control function