refactored role table to read mongo db entries