a 24points algorthm