For future reference you can format code on hn with a newline first then indenting each line by 2+ spaces. (Rather than triple tick)

Fixed it. thanks!