use dict instead of if-else chain