isolate functionality for each filetype in an object