extracted sensor processing into controller.