code for prototype