merged with design and fixed issues