Make if and statement on same line