added some methods and demo class