prepare for sign function.