Rewritten for clarity and reduced redundancy