F: improve performance