better def gen