update inner query
moving scheme