optimize prob18