drain implementation 1