updated latest code