Use block instead of conditional