design tests and fixed issues