readded value_id as value and updated the queries