Some crazy code up in this muthaf...