removed if-else