first working commit
fix some bugs in random image