updated version of joe code. inserted rita code