update docs, formatted code