updated to use only prefixpath as input