Implement arrival query (rough draft)