test basic insert algorithm