adds collapse/expand map functionality