I feel like I am saying this way too much but we can't just keep adding special checks for every single possible action, you need to use object oriented methods so that the code is cleaner, it is easier to change later and it won't make it so easy to create bugs.