changing to 3 arrays instead of implementing circular buffer jkasdfljadsfjkaklaj