how does the moon affect the earth