moved method & ajax dectect logic to request widget