else if and functions