major changes. hope it works now