added if statements for various actions