Ashkan: manually merged with test branch