programme against DOM interface instead of impl