add-function implemented