added a way to set the applicationid programmatically