implement the controller (not finished yet)

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>