moved filepath creation to its own variable