parse functioning, added parseInt for depth
providing default arguments for parse function