adjust logic