added functional tests
merged and added features