updated readme, updated example, fixed a bug