updated unit and functional tests