corrected $thing, added else if lines
entered array data