added some complexity, borrowed from JFDI tests