using path variable path instead of explicit string