first snapshot (not feature complete but works fine in most cases tested so far)