better filesystem navigation code