remove old main code
shorter generated code