Added pin and delete logic