fixed interfaces (and then compilation) to conform to blog post