added setPath function