added entityId
made entity ids signed ints