swap f7 and f8 functions