moved out into file manager class