There's not enough here to work with. Your array is blank, you are arbitrarily sending 0 and 7 as parameters, and the "merge" function isn't there. You've hard coded the "last" as 7 on the second call. If you follow the source exactly, it should work. Start by having locals for first and last, set them from the Params, then it will be easier to follow. You are taking too many shortcuts.