added BaseEntity class