improve sample code more elixirish

Tiny modification :santa: