added threading functionality to callback function
added credits