re-implemented for simplified api