bugs fixed - new features from Claudia's commit