started workin on simulator with referential transparancy