Use common function for creating prototype