Working on Mapper algorithm