better path trimming maybe