refactor stuff into dump_properties