tried to improve performance