begin adding sortcode fix
Further changes
Modify sortcode function