initial revision partially working