further work on design and started reworking implementation section.