added global object creation function