added sign constraints
fixed merge