check if input values are negative, change them to positive in that case.