modified the contacts logic