Finish the basic implementation and add an example