Works..mostly.. need to fix the array sort methods