added filename parsing