Grandad learns how to knit hats for premature babies