refactor so that cridentials are not part of the code