use even less pattern matching