renamed functions for clarity