implement the sign method.