modified to add map api