updated changes
updated logic with PWs