Added body of function and update comment