replace Result struct with map