pass obj instead of path