working map api functionality