internal compiler error
simplifying the bug
removed lots of functions
removed some unneeded types