finish logic flow