added more test methods and repair second and third problems