simplified by inlining call to very simple function