finished if-else assignment