completed 'add to pocket' function