integrated fifo and spb within main -- run still needs to be implemented