added more test
refactory something and fixed bug1234