alternative implementation of actor code and tests for it