refactor few "hot spots"