change interface and add docs