added second input variable