added if else statements
homework answers