Converted EntityKey() to basic int