updated entity to implement indexes
updated typehinting for entity
updated entity tests