added sorting at lower level in bot ali