work in progress, most of the reactive code done