implement substitute test