added a statful component implemented with channels, looks a bit erlangish but shame about the lock