merged a few methods into one