added more from schraiber, fixed stupid earlier errors.