cleaned up pins controller