added parameter to Update query in ready