working version, displays correct path