rewrote several wall functions to accommodate different numbers of users and user groups