added functionality for valid filetypes