Extracting fsHelper function