extended example code, added basic magnet URI generation