better implementation of winner