add simple support for alternate path

Need to write tests for this. For now it only support single alternate path