drain implementation copmlete; untested.
minor bugs