Working on drain function