used nested queries on the actions