Complete the add item function.