added funtionality for second variable.