Fixed code, added gen file