merged with olegs changes