work for both sigv2 and sigv4