Implemented % pop within x query