working  on entity API