updated all TODOs, exceptions and sample code