Import the code from https://madars.org/projects/blocksens/