create callback and casper_test function