insert & print func