added sign function