Updated controller for variable speed