finish all logic