added function for detect path