started to convert filehandler to object