added doc and optional args