phpunittest done & bugs fixed