change path generate method