Simplifying by using path module