contacts implemented and refactoring