added function for choosing path, choosePath()