total refactoring, add array fifo tests