improved functional test

detect success