refactor to promote performance