adding callback argument and autoResizeParent option