fixed some errors, working on making ararylist work with any type