#28 added functional test