added deal function