wip: improve performance