cleans up code for segue if statements