merged with dmt branch