Add final version of regule. TODO: clean up