fix awful performance