Sort of working implementation.