refactor className building