Added releasePin function