WIP to implement Pin API