working map but needs to be optimised