added if for location