don't sort twice, make position an int
Merge branch 'json'