updated assignment node + added optimazation for it