Use reference instead of pointer for instance
Return correct instance number, typedef for return_type