first commit. use if and elseif. don't know why it doesn't work.