map with case is also probably slower than it needs to be