changed signing logic