Fixed sample 18 and added callback functional