make 'sum' work on doubles, and fix codec for 'moving'