fixed functional test and go it to pass