added security for adding/deleting pins