modify path method