main takes path as a param.