Ajusted code to changed spec.