Edited on moreBranch,sys out index value and added comments.