started making each optimization function only submit an 'update' function - this seems fairly common in practice. will have another function to actually use the update in a loop