changed size_t template parameter to int, added tests for primitives