qualification passed code, minor tweaks from robot