Two police officers in Texas decided to buy a struggling father a child’s car seat instead of ticketing him after they pulled him over earlier this month for having an expired registration and malfunctioning light, KVUE.com reported.

The Cedar Park police officers pulled over the truck and saw three children in the backseat without car seats. They did not know the man, but they remembered other officers saying that he had been living in a car trying to save money.

“Giving him three tickets, it wasn’t going to do any good,” said Justin Gower, one of the officers. “Those kids were still going to have to be driven somewhere, somehow with no car seats.”

Gower and Officer Cale Hawkins decided to put their money together and purchased three pink age-appropriate car seats for the children, ages 1, 3 and 4 years old. The manager of the nearby Walmart, who knew the officers, gave them a discount and the price totaled $145.

The driver, who asked the station not to identify him, said in a statement, “It was nothing short of a miracle. It was something that was really needed. The officers have been a blessing.”

KXAN.com reported that the Texas Department of State Health Services offers free car seats through a program called Safe Riders.