slight improvment in model generator