re-generate and hotfix to make it work - see commented areas for TODO