First try at solution