beautified the structure a bit
generalizing ...