A PR to show more idiomatic way

Beware, not sure if code still works (i just wanted to show some stuff)