implement convert-to-map