if condition shortened with fixed styling