taking sherpa resp into account to write the code