More functional way