Got rid of unnecessary map function