fixed some things and bugged others. This needs a REDO