working version for 1.0, removed bugs related to advertiser and rep