make print_cons function