removed trailing whitespaces and added API doc