Began work on control function