Working prototype - Update click, juding function