Changed getMethod to get task