update to handle historical and realtime results
add basic functional test coverage