Minor change: elseif() by else { if()}