generic helpers for pins