new logic updated