just in case: this function is used above before its definition here