added edit javascript