fixed some typos
added options and export function