FIX: signature calculation