refactored credential code