updated with windows dir separator support