better entity generation