update design and fix security holes