My Code using Smack, before changing to ASmack