refactor, bug opposite dir, crash callback