removed duplicate code and added salt-minion