added jsDocs
added sample