moved functions (no functional change)