added doctrings