Added callback implementation and white spaces instead of tabs