add pin functionality