fixes and modified structure