refactor to use path and plugin plugins