started working on a map function, unfinished