better rain function