added table, array still not working properly