added some functions to class MoleculeStack