merged with other code