turned it into a function that returns map[][]