Added code for assigning paths