working on 'add' pin function