refactoring and added twitter resource