minor fixes
simplified random coord generation