demon class implementation