logic actually seems to work