finish remaining TODO part