abstracted mapping function to make room for others