pin to frontend and tail function