adding a conditional test