removes if-else statement and in its place puts a one-liner.