move collect pass out of jvm