Add logic for maps