adding better (in process) scala code generation