Pool Instantiate

Ok, so my pooling script has this psyeudo instantiate method. How can have this method behave more like the normal instantiate. So that following 2 things are possible:

// it returns the object
GameObject temp = pool1.Instantiate( pos1, Quaternion.identy) as Gameobject;
//or
 GameObject temp = (GameObject ) pool1.Instantiate( pos1, Quaternion.identy);
// it doesnt return  anything
poolScript.Instantiate( pos2, Quaternion.identy);

code:

// pseudo instatiate that object
public void Instantiate(Vector3 position, Quaternion rotation)
{
 // GetPooledObject gives me the next avaible obj in the pool and returns it
	GameObject temp = GetPooledObject ();    
	temp.transform.position = position;
	temp.transform.rotation = rotation;
	temp.SetActive (true);
}

public GameObject Instantiate(Vector3 position, Quaternion rotation)
{
// GetPooledObject gives me the next avaible obj in the pool and returns it
GameObject temp = GetPooledObject ();
temp.transform.position = position;
temp.transform.rotation = rotation;
temp.SetActive (true);
return temp;
}
The reason is that you were returning void. You need to return a GameObject