pulled two variables into function and added return statements for sunny day cases