update function names to show intent and align with existing code