added multifile support