move the drain handler to it's own file