implemented intial apply logic