Added the before and after sort options