added design diagram