added initialization of obj array, also could check if count==-1 to determine wheter or not there is anything in there