add comment
add test cases for template register ordering