add print tab func with pointers instead of arrays