some refactory on abstractdemo and demo classes