some updates to function and comments