added optional callback param in constructor