add assert() to tests
add malloc checks to tack
add a test for tack