add peers function
little fix code