better type generation