changed it to a global object