working controller plugin. switched to c-style main app