finish base entity function