refined again and test it