refactored berlin clock in elixir: more idiomatic