cleanup the constructor