compilation fixes, but code does not work yet