debugging the new focusing algorithm