some progress on implementing map