updates as per the comments