improvements; added path function