fix any bugs and add full example