controller generator working, still needs cleanup