use funcitonal programming