added drainTank and refactored to use interface for tests