refactorying pos_neg()