updated
updated logic