add to function