finally created query