optimization when creating schema