design and function updated