move a code block to another if statement.