updates and possible bug fix in Q Update function