refactor Control class methods to take prediction function as argument