updated logic & css