works on all filetypes, still many bugs