work in progress
fixes after compilation mistakes