F logic improvement