A bit less imperative code