add constructor and destroy method