changed if-else statement for openLabel