created logic