updated demos
added logical class to data handling plus tests