new logic
fixes, but does not work yet