make period an optional parameter, add docs.