changed result to map