updated version of assignement