Add method for test data
Fix some regex and codes