More robust and elegant code.