Using arrays instead of intmap