Use function to get win