Add query function to Storage class