fixed #138, documented generic functions