resolving callback hell in backup routine