Re-ordered helper functions for readability