Indentation could be a bit better, but ok