Implementation of the DEMON Algorithm