now can detect local definiton