cardmaze small refactoring