wrote backup host function