update code for prototype