mostly working compilation