use mappings instead of if-else-statements