cleaned up the pin stuff