added level counter
added level counter
added basic expand-path implementation