fixed some logic issues and added more complete group/dept. list from directory services