added getPath function to binary method