function from basic-edit-toolkit included.