few minor modifiy to perform_action()