improve code & docs