works with dynamic path