add customised message for fail
moved functional test into test folder
functional tests refactored