fixing more bugs, added untested function actionSuccess to test whether an action works