Edited query to be consistent with specification.