Added function and if and else if star statement.