restructuring for simplicity