this is where the magic happens.