added some functionality and demo project