defineEntity function defined