added onAdd callback
added onAdd callback
Added magic method to create html elements