add fp

add functional programming