tring this logic