grid ids and retrival