Practicing some error catching, but I think it makes too many if statemnts.