big update with some restructuring