fixed code that didn't compile