using functional style
using functional style