adding destructor to fix mem leak, due to undeleted member pointers