use key instead of storing entity directly