finished and added example implementation