implementation of design changes proposed in https://mantis.phplist.com/view.php?id=17449