added getFilename function