A bit more functional way