variable if statement for interleaved