added docstring and copyright/license statement