improved actor implementation + added tests for it