refactory utility add printing dat