getPath method