variable renaming and added check for action