Put global variables into  object