add first fn
add last fn