Created function to print to div