put test into if statement