implement assign handler