added runOnUIThread functionality