fixed if-else samples