logic fix & docs