helper functions EVERYWHERE