update code after removing dependency of location module