fixed type errors, examples working now