discretized update p, added calclikeinddiff for updateQ