added file searching function